package org.event.core.controller;

import org.event.core.entity.DeviceWarnInfo;
import org.event.core.service.producer.KafkaProduceService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zhangjm
 * @date 2023年11月29日 8:55
 */
@RequestMapping("send")
@RestController
public class SendWarnMegController {
    @Resource
    private KafkaProduceService kafkaProduceService;

    @GetMapping("sendMsg")
    public boolean sendWarnMessage(@RequestBody DeviceWarnInfo deviceWarnInfo) {
        return kafkaProduceService.sendWarnMessage(deviceWarnInfo);
    }

}
